{% extends 'registration/user_base.html'%}
{% block head %}
  <link rel="stylesheet" href="{% static 'css/datepicker.css' %}">
    <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
    <script src="{% static 'js/datepicker.js' %}"></script>
    <script src="{% static 'js/datepicker.zh-CN.js' %}"></script>

    <script>
      $(function() {
        $( "#id_date_born" ).datepicker({
            format: 'yyyy-mm-dd',
            language:'zh-CN',
        });
        $(".captcha").click(function () {
          $.getJSON("{% url 'movie:signup' %}",function(result){
            $('.captcha').attr('src', result.image_url);
            $('#id_captcha_0').val(result.key);
          });
      });
      });
    </script>
{% endblock %}
{% block content %}
                <h3>注册</h3>
                <form class="form" action="{% url 'movie:signup' %}" method="post">
                    {% csrf_token %}
                    {% for field in form %}
                        {{ field.label_tag }}
                        {{ field }}
                        {{ field.errors }}
                        {% if field.help_text %}
                            <p class="help text-small text-muted">{{ field.help_text|safe }}</p>
                        {% endif %}
                    {% endfor %}

                    <button type="submit" class="btn btn-primary btn-block">注册</button>
                </form>
                <div class="flex-center top-gap text-small">
                    <a href="{% url 'login' %}">已有账号登录</a>
                </div>
{% endblock %}



